package com.xxl.job.executor.persistence.beans;

import com.google.gson.annotations.SerializedName;

import java.math.BigDecimal;


/**
 * Created by yzm on 2019/11/18.
 */
public class EnPassRecordData implements BaseData {

    @SerializedName(value = "ID", alternate = {"id", "Id"})
    private String id;
    @SerializedName(value = "MEDIATYPE", alternate = {"mediaType"})
    private BigDecimal mediaType;
    @SerializedName(value = "OBUSIGN", alternate = {"obuSign"})
    private BigDecimal obuSign;
    @SerializedName(value = "TERMINALTRANSNO", alternate = {"terminalTransNo"})
    private String terminalTransNo;
    @SerializedName(value = "OBUID", alternate = {"obuId"})
    private String obuId;
    @SerializedName(value = "CARDID", alternate = {"cardId"})
    private String cardId;
    @SerializedName(value = "ENTIME", alternate = {"enTime"})
    private String enTime;
    @SerializedName(value = "VEHICLEID", alternate = {"vehicleId"})
    private String vehicleId;
    @SerializedName(value = "IDENTIFYVEHICLEID", alternate = {"identifyVehicleId"})
    private String identifyVehicleId;
    @SerializedName(value = "VEHICLETYPE", alternate = {"vehicleType"})
    private BigDecimal vehicleType;
    @SerializedName(value = "VEHICLECLASS", alternate = {"vehicleClass"})
    private BigDecimal vehicleClass;
    @SerializedName(value = "TAC", alternate = {"tac"})
    private String tac;
    @SerializedName(value = "TRANSTYPE", alternate = {"transType"})
    private String transType;
    @SerializedName(value = "TERMINALNO", alternate = {"terminalNo"})
    private String terminalNo;
    @SerializedName(value = "ENWEIGHT", alternate = {"enWeight"})
    private BigDecimal enWeight;
    @SerializedName(value = "ENAXLECOUNT", alternate = {"enAxleCount"})
    private BigDecimal enAxleCount;
    @SerializedName(value = "ELECTRICALPERCENTAGE", alternate = {"electricalPercentage"})
    private BigDecimal electricalPercentage;
    @SerializedName(value = "SIGNSTATUS", alternate = {"signStatus"})
    private BigDecimal signStatus;
    @SerializedName(value = "SPECIALTYPE", alternate = {"specialType"})
    private String specialType;
    @SerializedName(value = "VEHICLESIGNID", alternate = {"vehicleSignId"})
    private String vehicleSignId;
    @SerializedName(value = "ENTOLLLANEHEX", alternate = {"enTollLaneHex"})
    private String enTollLaneHex;
    @SerializedName(value = "PASSID", alternate = {"passId"})
    private String passId;
    @SerializedName(value = "OBUMAC", alternate = {"obumac"})
    private String obumac;
    @SerializedName(value = "OBUSN", alternate = {"obusn"})
    private String obusn;
    @SerializedName(value = "KEYVERSION", alternate = {"keyVersion"})
    private String keyVersion;
    @SerializedName(value = "DIRECTION", alternate = {"direction"})
    private BigDecimal direction;
    @SerializedName(value = "VERIFICATIONCODE", alternate = {"verificationCode"})
    private String verificationCode;
    @SerializedName(value = "CARDTYPE", alternate = {"cardType"})
    private BigDecimal cardType;
    private String listNo;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public BigDecimal getMediaType() {
        return mediaType;
    }

    public void setMediaType(BigDecimal mediaType) {
        this.mediaType = mediaType;
    }

    public BigDecimal getObuSign() {
        return obuSign;
    }

    public void setObuSign(BigDecimal obuSign) {
        this.obuSign = obuSign;
    }

    public String getTerminalTransNo() {
        return terminalTransNo;
    }

    public void setTerminalTransNo(String terminalTransNo) {
        this.terminalTransNo = terminalTransNo;
    }

    public String getObuId() {
        return obuId;
    }

    public void setObuId(String obuId) {
        this.obuId = obuId;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getEnTime() {
        return enTime;
    }

    public void setEnTime(String enTime) {
        this.enTime = enTime;
    }

    public String getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(String vehicleId) {
        this.vehicleId = vehicleId;
    }

    public String getIdentifyVehicleId() {
        return identifyVehicleId;
    }

    public void setIdentifyVehicleId(String identifyVehicleId) {
        this.identifyVehicleId = identifyVehicleId;
    }

    public BigDecimal getVehicleType() {
        return vehicleType;
    }

    public void setVehicleType(BigDecimal vehicleType) {
        this.vehicleType = vehicleType;
    }

    public BigDecimal getVehicleClass() {
        return vehicleClass;
    }

    public void setVehicleClass(BigDecimal vehicleClass) {
        this.vehicleClass = vehicleClass;
    }

    public String getTac() {
        return tac;
    }

    public void setTac(String tac) {
        this.tac = tac;
    }

    public String getTransType() {
        return transType;
    }

    public void setTransType(String transType) {
        this.transType = transType;
    }

    public String getTerminalNo() {
        return terminalNo;
    }

    public void setTerminalNo(String terminalNo) {
        this.terminalNo = terminalNo;
    }

    public BigDecimal getEnWeight() {
        return enWeight;
    }

    public void setEnWeight(BigDecimal enWeight) {
        this.enWeight = enWeight;
    }

    public BigDecimal getEnAxleCount() {
        return enAxleCount;
    }

    public void setEnAxleCount(BigDecimal enAxleCount) {
        this.enAxleCount = enAxleCount;
    }

    public BigDecimal getElectricalPercentage() {
        return electricalPercentage;
    }

    public void setElectricalPercentage(BigDecimal electricalPercentage) {
        this.electricalPercentage = electricalPercentage;
    }

    public BigDecimal getSignStatus() {
        return signStatus;
    }

    public void setSignStatus(BigDecimal signStatus) {
        this.signStatus = signStatus;
    }

    public String getSpecialType() {
        return specialType;
    }

    public void setSpecialType(String specialType) {
        this.specialType = specialType;
    }

    public String getVehicleSignId() {
        return vehicleSignId;
    }

    public void setVehicleSignId(String vehicleSignId) {
        this.vehicleSignId = vehicleSignId;
    }

    public String getEnTollLaneHex() {
        return enTollLaneHex;
    }

    public void setEnTollLaneHex(String enTollLaneHex) {
        this.enTollLaneHex = enTollLaneHex;
    }

    public String getPassId() {
        return passId;
    }

    public void setPassId(String passId) {
        this.passId = passId;
    }

    public String getObumac() {
        return obumac;
    }

    public void setObumac(String obumac) {
        this.obumac = obumac;
    }

    public String getObusn() {
        return obusn;
    }

    public void setObusn(String obusn) {
        this.obusn = obusn;
    }

    public String getKeyVersion() {
        return keyVersion;
    }

    public void setKeyVersion(String keyVersion) {
        this.keyVersion = keyVersion;
    }

    public BigDecimal getDirection() {
        return direction;
    }

    public void setDirection(BigDecimal direction) {
        this.direction = direction;
    }

    public String getVerificationCode() {
        return verificationCode;
    }

    public void setVerificationCode(String verificationCode) {
        this.verificationCode = verificationCode;
    }

    public BigDecimal getCardType() {
        return cardType;
    }

    public void setCardType(BigDecimal cardType) {
        this.cardType = cardType;
    }

    public String getListNo() {
        return listNo;
    }

    public void setListNo(String listNo) {
        this.listNo = listNo;
    }

    @Override
    public String findStringByKey(String key) throws Exception {
        String ret = "#{$NOT_FOUND$}#";
        switch (key) {
            case "ID": ret = getId();break;
            case "TERMINALTRANSNO": ret = getTerminalTransNo();break;
            case "OBUID": ret = getObuId();break;
            case "CARDID": ret = getCardId();break;
            case "ENTIME": ret = getEnTime();break;
            case "VEHICLEID": ret = getVehicleId();break;
            case "IDENTIFYVEHICLEID": ret = getIdentifyVehicleId();break;
            case "TAC": ret = getTac();break;
            case "TRANSTYPE": ret = getTransType();break;
            case "TERMINALNO": ret = getTerminalNo();break;
            case "SPECIALTYPE": ret = getSpecialType();break;
            case "VEHICLESIGNID": ret = getVehicleSignId();break;
            case "ENTOLLLANEHEX": ret = getEnTollLaneHex();break;
            case "PASSID": ret = getPassId();break;
            case "OBUMAC": ret = getObumac();break;
            case "OBUSN": ret = getObusn();break;
            case "KEYVERSION": ret = getKeyVersion();break;
            case "VERIFICATIONCODE": ret = getVerificationCode();break;
            case "LISTNO": ret = getListNo();break;
            default:break;
        }
        if (ret != null && ret.equals("#{$NOT_FOUND$}#")) {
            throw new Exception("EnPassRecordData未匹配到数据:" + key);
        }
        return ret;
    }

    @Override
    public BigDecimal findNumberByKey(String key) throws Exception {
        BigDecimal ret = null;
        boolean bNeeded = false;
        switch (key) {
            case "MEDIATYPE": ret = getMediaType();bNeeded = true;break;
            case "OBUSIGN": ret = getObuSign();bNeeded = true;break;
            case "VEHICLETYPE": ret = getVehicleType();bNeeded = true;break;
            case "VEHICLECLASS": ret = getVehicleClass();bNeeded = true;break;
            case "SIGNSTATUS": ret = getSignStatus();bNeeded = true;break;
            case "DIRECTION": ret = getDirection();bNeeded = true;break;

            case "ENWEIGHT": ret = getEnWeight();break;
            case "ENAXLECOUNT": ret = getEnAxleCount();break;
            case "ELECTRICALPERCENTAGE": ret = getElectricalPercentage();break;
            case "CARDTYPE": ret = getCardType();break;
            default:bNeeded = true;break;
        }
        if (ret == null && bNeeded) {
            throw new Exception("EnPassRecordData未匹配到数据");
        }
        return ret;
    }
}
